package com.niuke;

/**
 * @ClassName : JZ4
 * @Author : kele
 * @Date: 2023/4/2 15:11
 * @Description :
 */
public class JZ4 {

    public boolean Find(int target, int[][] array) {

        for (int i = array.length, j = 0; i > 0 && j < array[0].length; ) {
            if (array[i][j] == target) {
                return true;
            } else {
                if (target > array[i][j]) {
                    j++;
                } else {
                    i--;
                }
            }
        }
        return false;
    }
}
